<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>陈佳琪的资料 - 社交圈</title>
    <!-- Bootstrap 5 CSS -->
    <link href="https://cdncdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome 图标 -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
    
    <style>
        :root {
            --primary: #4f46e5;
            --primary-light: #818cf8;
            --primary-dark: #3730a3;
            --secondary: #ec4899;
            --success: #10b981;
            --warning: #f59e0b;
            --danger: #ef4444;
            --text-primary: #111827;
            --text-secondary: #6b7280;
            --bg-light: #f9fafb;
            --bg-white: #ffffff;
            --border-light: #e5e7eb;
            --radius: 12px;
            --shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            background-color: var(--bg-light);
            color: var(--text-primary);
            padding-top: 56px;
            padding-bottom: 60px;
        }
        
        /* 顶部导航 */
        .top-nav {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 56px;
            background-color: var(--bg-white);
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 16px;
            z-index: 1000;
            border-bottom: 1px solid var(--border-light);
        }
        
        .nav-title {
            font-size: 1.1rem;
            font-weight: 600;
        }
        
        .nav-action {
            color: var(--text-secondary);
            background: none;
            border: none;
            font-size: 1.2rem;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .nav-action:hover {
            background-color: var(--bg-light);
        }
        
        .nav-action.primary {
            color: var(--primary);
        }
        
        /* 封面图区域 */
        .cover-container {
            height: 180px;
            position: relative;
            overflow: hidden;
        }
        
        .cover-image {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        /* 个人资料区域 */
        .profile-container {
            padding: 0 16px;
            margin-top: -40px;
        }
        
        .avatar-container {
            display: flex;
            justify-content: space-between;
        }
        
        .avatar-wrapper {
            position: relative;
        }
        
        .profile-avatar {
            width: 100px;
            height: 100px;
            border-radius: 50%;
            object-fit: cover;
            border: 4px solid var(--bg-white);
            box-shadow: var(--shadow);
        }
        
        .avatar-status {
            position: absolute;
            bottom: 5px;
            right: 5px;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background-color: var(--success);
            border: 3px solid var(--bg-white);
        }
        
        .profile-actions {
            display: flex;
            gap: 10px;
            margin-top: 60px;
        }
        
        .action-button {
            padding: 8px 16px;
            border-radius: 8px;
            font-size: 0.9rem;
            font-weight: 500;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
        }
        
        .primary-button {
            background-color: var(--primary);
            color: white;
            border: none;
        }
        
        .secondary-button {
            background-color: var(--bg-light);
            color: var(--text-primary);
            border: 1px solid var(--border-light);
        }
        
        .icon-button {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background-color: var(--bg-light);
            color: var(--text-primary);
            border: 1px solid var(--border-light);
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        /* 个人信息 */
        .profile-info {
            padding: 16px;
        }
        
        .name-container {
            margin-bottom: 8px;
        }
        
        .profile-name {
            font-size: 1.4rem;
            font-weight: 700;
            display: inline-block;
        }
        
        .gender-icon {
            font-size: 1rem;
            margin-left: 8px;
        }
        
        .user-badges {
            display: flex;
            gap: 8px;
            margin: 8px 0;
        }
        
        .user-badge {
            font-size: 0.75rem;
            padding: 2px 8px;
            border-radius: 10px;
            background-color: rgba(79, 70, 229, 0.1);
            color: var(--primary);
        }
        
        .badge-verified {
            background-color: rgba(16, 185, 129, 0.1);
            color: var(--success);
        }
        
        .profile-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            font-size: 0.85rem;
            color: var(--text-secondary);
            margin-bottom: 12px;
        }
        
        .meta-item {
            display: flex;
            align-items: center;
            gap: 5px;
        }
        
        .profile-intro {
            font-size: 0.95rem;
            line-height: 1.6;
            margin-bottom: 16px;
        }
        
        /* 资料详情标签页 */
        .profile-tabs {
            display: flex;
            background-color: var(--bg-white);
            border-top: 1px solid var(--border-light);
            border-bottom: 1px solid var(--border-light);
        }
        
        .profile-tab {
            flex: 1;
            padding: 14px 0;
            text-align: center;
            font-size: 0.95rem;
            font-weight: 500;
            color: var(--text-secondary);
            position: relative;
        }
        
        .profile-tab.active {
            color: var(--primary);
        }
        
        .profile-tab.active::after {
            content: '';
            position: absolute;
            bottom: -1px;
            left: 0;
            right: 0;
            height: 2px;
            background-color: var(--primary);
        }
        
        /* 资料内容区域 */
        .profile-content {
            background-color: var(--bg-white);
        }
        
        .content-section {
            padding: 16px;
            border-bottom: 1px solid var(--border-light);
        }
        
        .section-title {
            font-size: 0.95rem;
            font-weight: 600;
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .section-title i {
            color: var(--primary);
        }
        
        /* 个人详情 */
        .detail-item {
            display: flex;
            padding: 10px 0;
            border-bottom: 1px solid var(--border-light);
        }
        
        .detail-item:last-child {
            border-bottom: none;
        }
        
        .detail-label {
            flex: 1;
            font-size: 0.9rem;
            color: var(--text-secondary);
        }
        
        .detail-value {
            flex: 2;
            font-size: 0.9rem;
            text-align: right;
        }
        
        /* 兴趣爱好 */
        .interests-list {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        
        .interest-item {
            padding: 6px 14px;
            background-color: var(--bg-light);
            border-radius: 20px;
            font-size: 0.85rem;
            color: var(--text-primary);
            border: 1px solid var(--border-light);
        }
        
        /* 照片墙 */
        .photos-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 4px;
        }
        
        .photo-item {
            aspect-ratio: 1;
            overflow: hidden;
        }
        
        .photo-image {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        /* 共同好友 */
        .friends-list {
            display: flex;
            flex-wrap: wrap;
            gap: 16px;
        }
        
        .friend-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            width: 70px;
        }
        
        .friend-avatar {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            object-fit: cover;
            margin-bottom: 6px;
        }
        
        .friend-name {
            font-size: 0.85rem;
            text-align: center;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            width: 100%;
        }
        
        /* 留言板 */
        .message-board {
            padding: 16px;
        }
        
        .message-input-container {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
        }
        
        .message-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            object-fit: cover;
        }
        
        .message-input-wrapper {
            flex: 1;
        }
        
        .message-input {
            width: 100%;
            padding: 10px 14px;
            border-radius: 20px;
            border: 1px solid var(--border-light);
            font-size: 0.9rem;
            background-color: var(--bg-light);
            resize: none;
            height: 42px;
        }
        
        .message-input:focus {
            outline: none;
            border-color: var(--primary-light);
        }
        
        .message-actions {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            margin-top: 8px;
        }
        
        .message-button {
            padding: 6px 14px;
            border-radius: 20px;
            font-size: 0.85rem;
            font-weight: 500;
        }
        
        /* 留言列表 */
        .messages-list {
            margin-top: 20px;
        }
        
        .message-item {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
        }
        
        .message-author-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            object-fit: cover;
        }
        
        .message-content {
            flex: 1;
        }
        
        .message-header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 4px;
        }
        
        .message-author {
            font-size: 0.85rem;
            font-weight: 600;
        }
        
        .message-time {
            font-size: 0.75rem;
            color: var(--text-secondary);
        }
        
        .message-text {
            background-color: var(--bg-light);
            padding: 10px 14px;
            border-radius: 18px;
            font-size: 0.9rem;
            position: relative;
            max-width: 85%;
        }
        
        .message-text::before {
            content: '';
            position: absolute;
            left: -8px;
            top: 10px;
            width: 0;
            height: 0;
            border-top: 8px solid transparent;
            border-right: 8px solid var(--bg-light);
            border-bottom: 8px solid transparent;
        }
        
        .message-actions {
            display: flex;
            gap: 16px;
            margin-top: 6px;
            margin-left: 0;
        }
        
        .message-action {
            font-size: 0.8rem;
            color: var(--text-secondary);
            display: flex;
            align-items: center;
            gap: 4px;
        }
        
        /* 回复区域 */
        .replies-container {
            margin-left: 30px;
            margin-top: 12px;
        }
        
        .reply-item {
            display: flex;
            gap: 8px;
            margin-bottom: 12px;
        }
        
        .reply-content {
            flex: 1;
        }
        
        .reply-text {
            background-color: var(--bg-light);
            padding: 8px 12px;
            border-radius: 14px;
            font-size: 0.85rem;
            position: relative;
            max-width: 85%;
        }
        
        .reply-text::before {
            content: '';
            position: absolute;
            left: -6px;
            top: 8px;
            width: 0;
            height: 0;
            border-top: 6px solid transparent;
            border-right: 6px solid var(--bg-light);
            border-bottom: 6px solid transparent;
        }
        
        .reply-author {
            font-weight: 600;
            margin-right: 6px;
        }
        
        /* 底部导航 */
        .bottom-nav {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            height: 60px;
            background-color: var(--bg-white);
            display: flex;
            justify-content: space-around;
            align-items: center;
            border-top: 1px solid var(--border-light);
            z-index: 1000;
        }
        
        .nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            color: var(--text-secondary);
            font-size: 0.7rem;
            gap: 4px;
            flex: 1;
            height: 100%;
        }
        
        .nav-item.active {
            color: var(--primary);
        }
        
        .nav-icon {
            font-size: 1.2rem;
        }
        
        /* 提示消息 */
        .toast {
            position: fixed;
            bottom: 80px;
            left: 50%;
            transform: translateX(-50%);
            background-color: rgba(0, 0, 0, 0.7);
            color: white;
            padding: 8px 16px;
            border-radius: 4px;
            z-index: 9999;
            font-size: 0.85rem;
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        
        .toast.show {
            opacity: 1;
        }
    </style>
</head>
<body>
    <!-- 顶部导航 -->
    <div class="top-nav">
        <button class="nav-action" id="backBtn">
            <i class="fas fa-arrow-left"></i>
        </button>
        <div class="nav-title">个人资料</div>
        <button class="nav-action primary" id="moreBtn">
            <i class="fas fa-ellipsis-h"></i>
        </button>
    </div>
    
    <!-- 封面图区域 -->
    <div class="cover-container">
        <img src="https://picsum.photos/id/1048/1000/500" alt="封面图" class="cover-image">
    </div>
    
    <!-- 个人资料区域 -->
    <div class="profile-container">
        <div class="avatar-container">
            <div class="avatar-wrapper">
                <img src="https://picsum.photos/id/64/200/200" alt="陈佳琪" class="profile-avatar">
                <div class="avatar-status"></div>
            </div>
            <div class="profile-actions">
                <button class="action-button primary-button" id="messageBtn">
                    <i class="fas fa-comment"></i> 发消息
                </button>
                <button class="action-button secondary-button" id="addFriendBtn">
                    <i class="fas fa-user-plus"></i> 加好友
                </button>
                <button class="icon-button" id="shareBtn">
                    <i class="fas fa-share-alt"></i>
                </button>
            </div>
        </div>
    </div>
    
    <!-- 个人信息 -->
    <div class="profile-info bg-white">
        <div class="name-container">
            <h1 class="profile-name">陈佳琪</h1>
            <i class="fas fa-female gender-icon" style="color: #ec4899;"></i>
        </div>
        
        <div class="user-badges">
            <span class="user-badge">UI设计师</span>
            <span class="user-badge badge-verified"><i class="fas fa-check"></i> 已认证</span>
        </div>
        
        <div class="profile-meta">
            <div class="meta-item">
                <i class="fas fa-calendar"></i>
                <span>27岁</span>
            </div>
            <div class="meta-item">
                <i class="fas fa-map-marker-alt"></i>
                <span>上海</span>
            </div>
            <div class="meta-item">
                <i class="fas fa-graduation-cap"></i>
                <span>本科</span>
            </div>
            <div class="meta-item">
                <i class="fas fa-clock"></i>
                <span>今天活跃</span>
            </div>
        </div>
        
        <p class="profile-intro">
            热爱生活的UI设计师，现任职于一家互联网公司。喜欢摄影和旅行，周末喜欢去探店和看展。期待认识有趣的朋友一起探索城市美好，交流设计心得。
        </p>
    </div>
    
    <!-- 资料详情标签页 -->
    <div class="profile-tabs">
        <div class="profile-tab active" data-tab="details">资料详情</div>
        <div class="profile-tab" data-tab="photos">照片</div>
        <div class="profile-tab" data-tab="friends">好友</div>
        <div class="profile-tab" data-tab="messages">留言板</div>
    </div>
    
    <!-- 资料内容区域 -->
    <div class="profile-content">
        <!-- 资料详情 -->
        <div class="content-tab active" id="details-tab">
            <div class="content-section">
                <div class="section-title">
                    <i class="fas fa-user"></i> 基本信息
                </div>
                <div class="detail-item">
                    <div class="detail-label">性别</div>
                    <div class="detail-value">女</div>
                </div>
                <div class="detail-item">
                    <div class="detail-label">生日</div>
                    <div class="detail-value">1996年5月12日</div>
                </div>
                <div class="detail-item">
                    <div class="detail-label">星座</div>
                    <div class="detail-value">金牛座</div>
                </div>
                <div class="detail-item">
                    <div class="detail-label">身高</div>
                    <div class="detail-value">165cm</div>
                </div>
            </div>
            
            <div class="content-section">
                <div class="section-title">
                    <i class="fas fa-briefcase"></i> 职业信息
                </div>
                <div class="detail-item">
                    <div class="detail-label">公司</div>
                    <div class="detail-value">创想科技有限公司</div>
                </div>
                <div class="detail-item">
                    <div class="detail-label">职位</div>
                    <div class="detail-value">UI/UX设计师</div>
                </div>
                <div class="detail-item">
                    <div class="detail-label">工作年限</div>
                    <div class="detail-value">5年</div>
                </div>
                <div class="detail-item">
                    <div class="detail-label">毕业院校</div>
                    <div class="detail-value">上海视觉艺术学院</div>
                </div>
            </div>
            
            <div class="content-section">
                <div class="section-title">
                    <i class="fas fa-heart"></i> 兴趣爱好
                </div>
                <div class="interests-list">
                    <div class="interest-item">摄影</div>
                    <div class="interest-item">旅行</div>
                    <div class="interest-item">设计</div>
                    <div class="interest-item">看展</div>
                    <div class="interest-item">探店</div>
                    <div class="interest-item">电影</div>
                    <div class="interest-item">咖啡</div>
                    <div class="interest-item">瑜伽</div>
                </div>
            </div>
            
            <div class="content-section">
                <div class="section-title">
                    <i class="fas fa-users"></i> 社交信息
                </div>
                <div class="detail-item">
                    <div class="detail-label">好友数量</div>
                    <div class="detail-value">328人</div>
                </div>
                <div class="detail-item">
                    <div class="detail-label">共同好友</div>
                    <div class="detail-value">12人</div>
                </div>
                <div class="detail-item">
                    <div class="detail-label">加入时间</div>
                    <div class="detail-value">2020年3月</div>
                </div>
            </div>
        </div>
        
        <!-- 照片 -->
        <div class="content-tab" id="photos-tab" style="display: none;">
            <div class="content-section" style="border-bottom: none;">
                <div class="section-title">
                    <i class="fas fa-images"></i> 个人相册 (24)
                </div>
                <div class="photos-grid">
                    <div class="photo-item">
                        <img src="https://picsum.photos/id/112/300/300" alt="照片1" class="photo-image">
                    </div>
                    <div class="photo-item">
                        <img src="https://picsum.photos/id/119/300/300" alt="照片2" class="photo-image">
                    </div>
                    <div class="photo-item">
                        <img src="https://picsum.photos/id/133/300/300" alt="照片3" class="photo-image">
                    </div>
                    <div class="photo-item">
                        <img src="https://picsum.photos/id/142/300/300" alt="照片4" class="photo-image">
                    </div>
                    <div class="photo-item">
                        <img src="https://picsum.photos/id/160/300/300" alt="照片5" class="photo-image">
                    </div>
                    <div class="photo-item">
                        <img src="https://picsum.photos/id/177/300/300" alt="照片6" class="photo-image">
                    </div>
                    <div class="photo-item">
                        <img src="https://picsum.photos/id/180/300/300" alt="照片7" class="photo-image">
                    </div>
                    <div class="photo-item">
                        <img src="https://picsum.photos/id/239/300/300" alt="照片8" class="photo-image">
                    </div>
                    <div class="photo-item">
                        <img src="https://picsum.photos/id/240/300/300" alt="照片9" class="photo-image">
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 好友 -->
        <div class="content-tab" id="friends-tab" style="display: none;">
            <div class="content-section" style="border-bottom: none;">
                <div class="section-title">
                    <i class="fas fa-users"></i> 共同好友 (12)
                </div>
                <div class="friends-list">
                    <div class="friend-item">
                        <img src="https://picsum.photos/id/91/200/200" alt="好友1" class="friend-avatar">
                        <span class="friend-name">李明</span>
                    </div>
                    <div class="friend-item">
                        <img src="https://picsum.photos/id/65/200/200" alt="好友2" class="friend-avatar">
                        <span class="friend-name">王芳</span>
                    </div>
                    <div class="friend-item">
                        <img src="https://picsum.photos/id/22/200/200" alt="好友3" class="friend-avatar">
                        <span class="friend-name">刘强</span>
                    </div>
                    <div class="friend-item">
                        <img src="https://picsum.photos/id/54/200/200" alt="好友4" class="friend-avatar">
                        <span class="friend-name">赵静</span>
                    </div>
                    <div class="friend-item">
                        <img src="https://picsum.photos/id/62/200/200" alt="好友5" class="friend-avatar">
                        <span class="friend-name">孙伟</span>
                    </div>
                    <div class="friend-item">
                        <div class="friend-avatar" style="background-color: #f1f5f9; display: flex; align-items: center; justify-content: center; color: #6b7280;">
                            <i class="fas fa-plus"></i>
                        </div>
                        <span class="friend-name">查看全部</span>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 留言板 -->
        <div class="content-tab" id="messages-tab" style="display: none;">
            <div class="message-board">
                <div class="message-input-container">
                    <img src="https://picsum.photos/id/1005/200/200" alt="你的头像" class="message-avatar">
                    <div class="message-input-wrapper">
                        <textarea class="message-input" placeholder="写下你的留言..."></textarea>
                        <div class="message-actions">
                            <button class="message-button secondary-button">取消</button>
                            <button class="message-button primary-button" id="sendMessageBtn">发送</button>
                        </div>
                    </div>
                </div>
                
                <div class="messages-list">
                    <!-- 留言1 -->
                    <div class="message-item">
                        <img src="https://picsum.photos/id/91/200/200" alt="李明" class="message-author-avatar">
                        <div class="message-content">
                            <div class="message-header">
                                <span class="message-author">李明</span>
                                <span class="message-time">3天前</span>
                            </div>
                            <div class="message-text">
                                佳琪的设计作品真的很棒，上次合作的项目客户非常满意！
                            </div>
                            <div class="message-actions">
                                <span class="message-action"><i class="far fa-heart"></i> 点赞</span>
                                <span class="message-action"><i class="far fa-comment"></i> 回复</span>
                            </div>
                            
                            <!-- 回复 -->
                            <div class="replies-container">
                                <div class="reply-item">
                                    <img src="https://picsum.photos/id/64/200/200" alt="陈佳琪" class="message-author-avatar" style="width: 32px; height: 32px;">
                                    <div class="reply-content">
                                        <div class="message-header">
                                            <span class="message-author">陈佳琪</span>
                                            <span class="message-time">2天前</span>
                                        </div>
                                        <div class="reply-text">
                                            <span class="reply-author">陈佳琪</span>谢谢夸奖，合作很愉快！
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    
                    <!-- 留言2 -->
                    <div class="message-item">
                        <img src="https://picsum.photos/id/65/200/200" alt="王芳" class="message-author-avatar">
                        <div class="message-content">
                            <div class="message-header">
                                <span class="message-author">王芳</span>
                                <span class="message-time">1周前</span>
                            </div>
                            <div class="message-text">
                                上周一起看的那个展览真不错，下次有好展览再约呀！
                            </div>
                            <div class="message-actions">
                                <span class="message-action"><i class="far fa-heart"></i> 点赞</span>
                                <span class="message-action"><i class="far fa-comment"></i> 回复</span>
                            </div>
                        </div>
                    </div>
                    
                    <!-- 留言3 -->
                    <div class="message-item">
                        <img src="https://picsum.photos/id/22/200/200" alt="刘强" class="message-author-avatar">
                        <div class="message-content">
                            <div class="message-header">
                                <span class="message-author">刘强</span>
                                <span class="message-time">2周前</span>
                            </div>
                            <div class="message-text">
                                请教一下，你用的那款修图软件是什么？拍出来的照片色调很舒服
                            </div>
                            <div class="message-actions">
                                <span class="message-action"><i class="fas fa-heart" style="color: var(--danger);"></i> 12</span>
                                <span class="message-action"><i class="far fa-comment"></i> 回复</span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <!-- 底部导航 -->
    <div class="bottom-nav">
        <div class="nav-item">
            <i class="fas fa-home nav-icon"></i>
            <span>首页</span>
        </div>
        <div class="nav-item active">
            <i class="fas fa-compass nav-icon"></i>
            <span>发现</span>
        </div>
        <div class="nav-item">
            <i class="fas fa-users nav-icon"></i>
            <span>人脉</span>
        </div>
        <div class="nav-item">
            <i class="fas fa-bell nav-icon"></i>
            <span>通知</span>
        </div>
        <div class="nav-item">
            <i class="fas fa-user nav-icon"></i>
            <span>我的</span>
        </div>
    </div>
    
    <!-- 提示消息元素 -->
    <div class="toast" id="toast"></div>
    
    <!-- Bootstrap JS Bundle with Popper -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
    
    <script>
        // 标签页切换
        document.querySelectorAll('.profile-tab').forEach(tab => {
            tab.addEventListener('click', function() {
                // 切换标签激活状态
                document.querySelectorAll('.profile-tab').forEach(t => t.classList.remove('active'));
                this.classList.add('active');
                
                // 切换内容显示
                const tabId = this.getAttribute('data-tab') + '-tab';
                document.querySelectorAll('.content-tab').forEach(content => {
                    content.style.display = 'none';
                });
                document.getElementById(tabId).style.display = 'block';
            });
        });
        
        // 发消息按钮
        document.getElementById('messageBtn').addEventListener('click', function() {
            showToast('打开与陈佳琪的聊天窗口');
        });
        
        // 加好友按钮
        document.getElementById('addFriendBtn').addEventListener('click', function() {
            this.innerHTML = '<i class="fas fa-check"></i> 已发送';
            this.disabled = true;
            this.style.backgroundColor = 'var(--success)';
            showToast('好友请求已发送给陈佳琪');
        });
        
        // 分享按钮
        document.getElementById('shareBtn').addEventListener('click', function() {
            showToast('分享成功');
        });
        
        // 发送留言按钮
        document.getElementById('sendMessageBtn').addEventListener('click', function() {
            const messageInput = document.querySelector('.message-input');
            const messageText = messageInput.value.trim();
            
            if (messageText) {
                showToast('留言发送成功');
                messageInput.value = '';
            } else {
                showToast('请输入留言内容');
            }
        });
        
        // 留言操作
        document.querySelectorAll('.message-action').forEach(action => {
            action.addEventListener('click', function() {
                if (this.querySelector('.fa-heart')) {
                    if (this.querySelector('.far')) {
                        this.innerHTML = '<i class="fas fa-heart" style="color: var(--danger);"></i> 点赞';
                        showToast('点赞成功');
                    } else {
                        this.innerHTML = '<i class="far fa-heart"></i> 点赞';
                        showToast('取消点赞');
                    }
                } else if (this.querySelector('.fa-comment')) {
                    showToast('回复功能待实现');
                }
            });
        });
        
        // 照片点击
        document.querySelectorAll('.photo-image').forEach(photo => {
            photo.addEventListener('click', function() {
                showToast('查看照片详情');
            });
        });
        
        // 好友点击
        document.querySelectorAll('.friend-item').forEach(friend => {
            friend.addEventListener('click', function() {
                if (this.querySelector('.fa-plus')) {
                    showToast('查看全部共同好友');
                } else {
                    const friendName = this.querySelector('.friend-name').textContent;
                    showToast(`查看${friendName}的资料`);
                }
            });
        });
        
        // 返回按钮
        document.getElementById('backBtn').addEventListener('click', function() {
            history.back();
        });
        
        // 更多按钮
        document.getElementById('moreBtn').addEventListener('click', function() {
            showToast('更多操作菜单');
        });
        
        // 提示消息功能
        function showToast(message) {
            const toast = document.getElementById('toast');
            toast.textContent = message;
            toast.classList.add('show');
            
            setTimeout(() => {
                toast.classList.remove('show');
            }, 2000);
        }
    </script>
</body>
</html>

